{% extends 'base.html' %}
{% block customcss %}
    <style>
        #review a:hover,
        #apply a:hover,
        {#        #apply_all a:hover,#} #message a:hover,
        #juese a:hover,
        #dirs a:hover,
        #all_user a:hover,
        #use_api a:hover {
            background-color: #009688;
        }

        .status-this {
            border: 1px solid #2F4056;
            border-radius: 4px;
            background-color: #2F4056;
            color: #fff !important;
        }

        #mulu .sanjimulu {
            padding-left: 40px;
        }

        .main-content {
            background-color: #fff;
        }

        .laytable-cell-1-status {
            text-align: center;
        }
    </style>
{% endblock %}
{% block title %}
    <title>{{ title }}</title>
{% endblock %}
{% block content %}
    <div class="layui-row layui-col-space10">
        <div class="layui-col-md2">
            <ul class="layui-nav layui-nav-tree" id="mulu" style="width: 100%">
                {% if request.session.level_id == 0 %}
                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="javascript:;">用户管理</a>
                        <dl class="layui-nav-child" id="all_user">
                            <dd><a href="/user/account_manage/">所有用户</a></dd>
                        </dl>
                        <dl class="layui-nav-child">
                            <dd id="department">
                                <a href="javascript:;">部门</a>
                                <dl class="layui-nav-child" id="dirs">
                                    {% for dir in dirs %}
                                        <dd><a href="/user/account_manage/?dir_id={{ dir.id }}" dir="{{ dir.id }}"
                                               class="sanjimulu">{{ dir.name }}</a></dd>
                                    {% endfor %}
                                    <dd><a href="/user/account_manage/?dir_id=0" dir="0"
                                           class="sanjimulu">其他</a></dd>
                                </dl>
                            </dd>
                            <dd id="role">
                                <a href="javascript:;">角色</a>
                                <dl class="layui-nav-child" id="juese">
                                    <dd>
                                        <a href="/user/account_manage/?level_id=1" level_id="1"
                                           class="sanjimulu">管理员</a>
                                    </dd>
{#                                    <dd>#}
{#                                        <a href="/user/account_manage/?level_id=2" level_id="2" class="sanjimulu">访客</a>#}
{#                                    </dd>#}
                                </dl>
                            </dd>
                        </dl>
                    </li>
                    {#                    <li class="layui-nav-item {% if request.session.level_id != 0 %}layui-nav-itemed{% endif %}">#}
                    {#                        <a href="javascript:;">资源交互记录</a>#}
                    {#                        <dl class="layui-nav-child" id="apply_all">#}
                    {#                            <dd><a href="/user/resource/application/1/?all_r=1" status="1">已通过</a></dd>#}
                    {#                            <dd><a href="/user/resource/application/0/?all_r=1" status="0">待审核</a></dd>#}
                    {#                            <dd><a href="/user/resource/application/2/?all_r=1" status="2">被拒绝</a></dd>#}
                    {#                        </dl>#}
                    {#                    </li>#}
                {% endif %}
                <li class="layui-nav-item layui-nav-itemed" id="apply">
                    {#                    <a href="javascript:;">我的申请记录</a>#}
                    <a href="/user/resource/application/0/" status="1">我的申请记录</a>
                    {#                    <dl class="layui-nav-child" id="apply">#}
                    {#                        <dd><a href="/user/resource/application/1/" status="1">已通过</a></dd>#}
                    {#                        <dd><a href="/user/resource/application/0/" status="0">待审核</a></dd>#}
                    {#                        <dd><a href="/user/resource/application/2/" status="2">被拒绝</a></dd>#}
                    {#                    </dl>#}
                </li>
                <li class="layui-nav-item  layui-nav-itemed" id="review">
                    <a href="/user/resource/review/0/" status="0">
                        我的审核记录
                        <span class="layui-badge" style="display: none"></span>
                    </a>
                    {#                    <dl class="layui-nav-child" id="review">#}
                    {#                        <dd>#}
                    {#                            <a href="/user/resource/review/0/" status="0" id="wait_review">#}
                    {#                                <span>待审核</span>#}
                    {#                                <span class="layui-badge" style="display: none"></span>#}
                    {#                            </a>#}
                    {#                        </dd>#}
                    {#                        只要审核过了，无论是通过还是拒绝，都放入已审核#}
                    {#                        <dd><a href="/user/resource/review/12/" status="12">已审核</a></dd>#}
                    {#                    </dl>#}
                </li>
                <li class="layui-nav-item  layui-nav-itemed" id="message">
                    <a href="/user/message/2/" status="0">
                        我的消息
                        <span class="layui-badge" style="display: none"></span>
                    </a>
                    {#                    <dl class="layui-nav-child" id="message">#}
                    {#                        <dd>#}
                    {#                            <a href="/user/message/0/" status="0" id="new_msg">#}
                    {#                                <span>新消息</span>#}
                    {#                                <span class="layui-badge" style="display: none"></span>#}
                    {#                            </a>#}
                    {#                        </dd>#}
                    {#                        <dd><a href="/user/message/1/" status="1">已读消息</a></dd>#}
                    {#                        <dd><a href="/user/message/2/" status="2">全部消息</a></dd>#}
                    {#                     TODO   系统消息，暂认为是超级管理员进行的消息推送，此处不进行逻辑处理#}
                    {#                        <dd><a href="/user/message/system/">系统消息</a></dd>#}
                    {#                    </dl>#}
                </li>
                <li class="layui-nav-item layui-nav-itemed" id="use_api">
                    <a href="/user/userapirecord/">API使用记录表</a>
                </li>
            </ul>
        </div>
        <div class="layui-col-md10" id="table">
            {% block table %}
            {% endblock %}
        </div>
    </div>
{% endblock %}
{% block customjs %}
    <script src="/static/js/set_csrf_async.js"></script>
{% endblock %}


